    class Pyramid
   {
      double B;
      double p;
      double s;
      double h;
   
       public Pyramid (double B, double h)
      {
         this.B=B;
         this.h=h;
      }
   
       public Pyramid (double B, double p, double s)
      {
         this.B=B;
         this.p=p;
         this.s=s;
      }
   
       public double getVolume()
      {
			return (B * h)/3;
      }
   
   
       public double getSA()
      {
			return B + ((p * s) / 2);
      }
   }
